import { request } from '../utils/request'

// // 注册
// export const register = (data) => {
//   return request({
//     url: '',
//     method: 'post',
//   })
// }

// 登录接口
export const login = (data) => request.post('/api/auth/login', data)

// 注册接口
export const register = (data) => request.post('/api/auth/register', data)


//查询所有老师
export const getAllTeacher = () => request.get('/api/teachers')

// 新增老师
export const addTeacher = (data) => request.post('/api/teachers', data)

// 修改
export const updateTeacher = (id, data) => request.put(`/api/teachers/${id}`, data)

// 删除老师
export const deleteTeacher = (id) => request.delete(`/api/teachers/${id}`)